﻿Imports Publics
Public Class clsHeThong

End Class

Public Class clsPSNhapXuat

    Private _IDLop As String
    Public Property IDLop() As String
        Get
            Return _IDLop
        End Get
        Set(ByVal value As String)
            _IDLop = value
        End Set
    End Property

    Private _IDMonHoc As String
    Public Property IDMonHoc() As String
        Get
            Return _IDMonHoc
        End Get
        Set(ByVal value As String)
            _IDMonHoc = value
        End Set
    End Property

    Private _IDTacGia As String
    Public Property IDTacGia() As String
        Get
            Return _IDTacGia
        End Get
        Set(ByVal value As String)
            _IDTacGia = value
        End Set
    End Property

    Private _IDNguon As String
    Public Property IDNguon() As String
        Get
            Return _IDNguon
        End Get
        Set(ByVal value As String)
            _IDNguon = value
        End Set
    End Property

    Private _IDMangSP As String
    Public Property IDMangSP() As String
        Get
            Return _IDMangSP
        End Get
        Set(ByVal value As String)
            _IDMangSP = value
        End Set
    End Property

    Private _IDNhaSX As String
    Public Property IDNhaSX() As String
        Get
            Return _IDNhaSX
        End Get
        Set(ByVal value As String)
            _IDNhaSX = value
        End Set
    End Property

    Private _MaNkiTu As String
    Public Property MaNkiTu() As String
        Get
            Return _MaNkiTu
        End Get
        Set(ByVal value As String)
            _MaNkiTu = value
        End Set
    End Property

    Private _TenSPTheoMaNkiTu As String
    Public Property TenSPTheoMaNkiTu() As String
        Get
            Return _TenSPTheoMaNkiTu
        End Get
        Set(ByVal value As String)
            _TenSPTheoMaNkiTu = value
        End Set
    End Property

    Private _MaKho As String
    Public Property MaKho() As String
        Get
            Return _MaKho
        End Get
        Set(ByVal value As String)
            _MaKho = value
        End Set
    End Property

    Private _TenKho As String
    Public Property TenKho() As String
        Get
            Return _TenKho
        End Get
        Set(ByVal value As String)
            _TenKho = value
        End Set
    End Property

    Private _NamXuatBan As Integer
    Public Property NamXuatBan() As Integer
        Get
            Return _NamXuatBan
        End Get
        Set(ByVal value As Integer)
            _NamXuatBan = value
        End Set
    End Property

    Private _IDHoaDonChiTiet As String
    Public Property IDHoaDonChiTiet() As String
        Get
            Return _IDHoaDonChiTiet
        End Get
        Set(ByVal value As String)
            _IDHoaDonChiTiet = value
        End Set
    End Property

    'Private _loaiHoaDon As ELoaiHoaDonNhapXuat = ELoaiHoaDonNhapXuat.HoaDon
    'Public Property loaiHoaDon() As ELoaiHoaDonNhapXuat
    '    Get
    '        Return _loaiHoaDon
    '    End Get
    '    Set(ByVal value As ELoaiHoaDonNhapXuat)
    '        _loaiHoaDon = value
    '    End Set
    'End Property

    ''' <summary>
    ''' Dùng cho NXT kí gửi
    ''' </summary>
    ''' <remarks></remarks>
    Private _IDDonViKG As String
    Public Property IDDonViKG() As String
        Get
            Return _IDDonViKG
        End Get
        Set(ByVal value As String)
            _IDDonViKG = value
        End Set
    End Property

    Private _IDNoiNhanHang As String
    Public Property IDNoiNhanHang() As String
        Get
            Return _IDNoiNhanHang
        End Get
        Set(ByVal value As String)
            _IDNoiNhanHang = value
        End Set
    End Property

    Private _DonGia As Decimal
    Public Property DonGia() As Decimal
        Get
            Return _DonGia
        End Get
        Set(ByVal value As Decimal)
            _DonGia = value
        End Set
    End Property

    Private _IDKho As String
    Public Property IDKho() As String
        Get
            Return _IDKho
        End Get
        Set(ByVal value As String)
            _IDKho = value
        End Set
    End Property

    Private _IDSP As String
    Public Property IDSP() As String
        Get
            Return _IDSP
        End Get
        Set(ByVal value As String)
            _IDSP = value
        End Set
    End Property

    Private _MaSP As String
    Public Property MaSP() As String
        Get
            Return _MaSP
        End Get
        Set(ByVal value As String)
            _MaSP = value
        End Set
    End Property

    Private _TenSP As String
    Public Property TenSP() As String
        Get
            Return _TenSP
        End Get
        Set(ByVal value As String)
            _TenSP = value
        End Set
    End Property

    Private _MaKeHoach As String
    Public Property MaKeHoach() As String
        Get
            Return _MaKeHoach
        End Get
        Set(ByVal value As String)
            _MaKeHoach = value
        End Set
    End Property

    Private _NgayCT As Date?
    Public Property NgayCT() As Date?
        Get
            Return _NgayCT
        End Get
        Set(ByVal value As Date?)
            _NgayCT = value
        End Set
    End Property

    Private _SoLuong As Decimal
    Public Property SoLuong() As Decimal
        Get
            Return _SoLuong
        End Get
        Set(ByVal value As Decimal)
            _SoLuong = value
        End Set
    End Property

    Private _Tien As Decimal
    Public Property Tien() As Decimal
        Get
            Return _Tien
        End Get
        Set(ByVal value As Decimal)
            _Tien = value
        End Set
    End Property

    Private _TienGiaVon As Decimal
    Public Property TienGiaVon() As Decimal
        Get
            Return _TienGiaVon
        End Get
        Set(ByVal value As Decimal)
            _TienGiaVon = value
        End Set
    End Property

    Private _isThucNhapXuat As Boolean
    Public Property isThucNhapXuat() As Boolean
        Get
            Return _isThucNhapXuat
        End Get
        Set(ByVal value As Boolean)
            _isThucNhapXuat = value
        End Set
    End Property

    Private _NgayThucNhapXuat As Date?
    Public Property NgayThucNhapXuat() As Date?
        Get
            Return _NgayThucNhapXuat
        End Get
        Set(ByVal value As Date?)
            _NgayThucNhapXuat = value
        End Set
    End Property

#Region "Thêm cho báo cáo nhập xuất"

    Private _IDHoaDon As String
    Public Property IDHoaDon() As String
        Get
            Return _IDHoaDon
        End Get
        Set(ByVal value As String)
            _IDHoaDon = value
        End Set
    End Property

    Private _IDNhomKH As String
    Public Property IDNhomKH() As String
        Get
            Return _IDNhomKH
        End Get
        Set(ByVal value As String)
            _IDNhomKH = value
        End Set
    End Property

    Private _IDKH As String
    Public Property IDKH() As String
        Get
            Return _IDKH
        End Get
        Set(ByVal value As String)
            _IDKH = value
        End Set
    End Property

    Private _IDTCNX As String
    Public Property IDTCNX() As String
        Get
            Return _IDTCNX
        End Get
        Set(ByVal value As String)
            _IDTCNX = value
        End Set
    End Property

    Private _IDHTTT As String
    Public Property IDHTTT() As String
        Get
            Return _IDHTTT
        End Get
        Set(ByVal value As String)
            _IDHTTT = value
        End Set
    End Property

    Private _TienCK As Decimal
    Public Property TienCK() As Decimal
        Get
            Return _TienCK
        End Get
        Set(ByVal value As Decimal)
            _TienCK = value
        End Set
    End Property

    Private _TienTT As Decimal
    Public Property TienTT() As Decimal
        Get
            Return _TienTT
        End Get
        Set(ByVal value As Decimal)
            _TienTT = value
        End Set
    End Property

    Private _TienThue As Decimal
    Public Property TienThue() As Decimal
        Get
            Return _TienThue
        End Get
        Set(ByVal value As Decimal)
            _TienThue = value
        End Set
    End Property

    Private _ThanhTien As Decimal
    Public Property ThanhTien() As Decimal
        Get
            Return _ThanhTien
        End Get
        Set(ByVal value As Decimal)
            _ThanhTien = value
        End Set
    End Property

    Private _TiLeCK As Decimal
    Public Property TiLeCK() As Decimal
        Get
            Return _TiLeCK
        End Get
        Set(ByVal value As Decimal)
            _TiLeCK = value
        End Set
    End Property

    Private _SoHDTC As String
    Public Property SoHDTC() As String
        Get
            Return _SoHDTC
        End Get
        Set(ByVal value As String)
            _SoHDTC = value
        End Set
    End Property

    Private _SoCT As String
    Public Property SoCT() As String
        Get
            Return _SoCT
        End Get
        Set(ByVal value As String)
            _SoCT = value
        End Set
    End Property

    Private _NgayHoaDonTC As Date?
    Public Property NgayHoaDonTC() As Date?
        Get
            Return _NgayHoaDonTC
        End Get
        Set(ByVal value As Date?)
            _NgayHoaDonTC = value
        End Set
    End Property

    Private _TenNV As String
    Public Property TenNV() As String
        Get
            Return _TenNV
        End Get
        Set(ByVal value As String)
            _TenNV = value
        End Set
    End Property

#End Region

    Public Sub New()

    End Sub

    Public Sub New(ByVal IDKho1 As String, ByVal IDSP1 As String, ByVal NgayCT1 As Date, ByVal SoLuong1 As Decimal, ByVal Tien1 As Decimal, ByVal TienGiaVon1 As Decimal)
        IDKho = IDKho1
        IDSP = IDSP1
        NgayCT = NgayCT1
        SoLuong = SoLuong1
        Tien = Tien1
        TienGiaVon = TienGiaVon1
    End Sub
End Class


''' <summary>
''' Dùng để kết chuyển số dư đầu kỳ
''' </summary>
''' <remarks></remarks>
Public Class clsSoDu

    Private _GBDK As Decimal
    Public Property GBDK() As Decimal
        Get
            Return _GBDK
        End Get
        Set(ByVal value As Decimal)
            _GBDK = value
        End Set
    End Property

    Private _IDDonViKG As String
    Public Property IDDonViKG() As String
        Get
            Return _IDDonViKG
        End Get
        Set(ByVal value As String)
            _IDDonViKG = value
        End Set
    End Property

    Private _IDKho As String
    Public Property IDKho() As String
        Get
            Return _IDKho
        End Get
        Set(ByVal value As String)
            _IDKho = value
        End Set
    End Property

    Private _IDSanPham As String
    Public Property IDSanPham() As String
        Get
            Return _IDSanPham
        End Get
        Set(ByVal value As String)
            _IDSanPham = value
        End Set
    End Property

    Private _GiaBia As Decimal
    Public Property GiaBia() As Decimal
        Get
            Return _GiaBia
        End Get
        Set(ByVal value As Decimal)
            _GiaBia = value
        End Set
    End Property

    Private _SLDK As Decimal
    Public Property SLDK() As Decimal
        Get
            Return _SLDK
        End Get
        Set(ByVal value As Decimal)
            _SLDK = value
        End Set
    End Property

    Private _GVDK As Decimal
    Public Property GVDK() As Decimal
        Get
            Return _GVDK
        End Get
        Set(ByVal value As Decimal)
            _GVDK = value
        End Set
    End Property

    Private _SLNK As Decimal
    Public Property SLNK() As Decimal
        Get
            Return _SLNK
        End Get
        Set(ByVal value As Decimal)
            _SLNK = value
        End Set
    End Property

    Private _GVNK As Decimal
    Public Property GVNK() As Decimal
        Get
            Return _GVNK
        End Get
        Set(ByVal value As Decimal)
            _GVNK = value
        End Set
    End Property

    Private _SLXK As Decimal
    Public Property SLXK() As Decimal
        Get
            Return _SLXK
        End Get
        Set(ByVal value As Decimal)
            _SLXK = value
        End Set
    End Property

    Private _GVXK As Decimal
    Public Property GVXK() As Decimal
        Get
            Return _GVXK
        End Get
        Set(ByVal value As Decimal)
            _GVXK = value
        End Set
    End Property

    Private _SLCK As Decimal
    Public Property SLCK() As Decimal
        Get
            Return _SLCK
        End Get
        Set(ByVal value As Decimal)
            _SLCK = value
        End Set
    End Property

    Private _GVCK As Decimal
    Public Property GVCK() As Decimal
        Get
            Return _GVCK
        End Get
        Set(ByVal value As Decimal)
            _GVCK = value
        End Set
    End Property

End Class


Public Class clsNhapXuatTonBase
#Region "Dung cho XemNhanhTonKho"

    Private _MaVach As String
    Public Property MaVach() As String
        Get
            Return _MaVach
        End Get
        Set(ByVal value As String)
            _MaVach = value
        End Set
    End Property

    Private _MaSP As String
    Public Property MaSP() As String
        Get
            Return _MaSP
        End Get
        Set(ByVal value As String)
            _MaSP = value
        End Set
    End Property

    Private _TenSP As String
    Public Property TenSP() As String
        Get
            Return _TenSP
        End Get
        Set(ByVal value As String)
            _TenSP = value
        End Set
    End Property

    Private _Thue As Decimal
    Public Property Thue() As Decimal
        Get
            Return _Thue
        End Get
        Set(ByVal value As Decimal)
            _Thue = value
        End Set
    End Property

    Private _ViTri As String
    Public Property ViTri() As String
        Get
            Return _ViTri
        End Get
        Set(ByVal value As String)
            _ViTri = value
        End Set
    End Property

    Private _GiaBia As Decimal
    Public Property GiaBia() As Decimal
        Get
            Return _GiaBia
        End Get
        Set(ByVal value As Decimal)
            _GiaBia = value
        End Set
    End Property

    Private _BanBo As Decimal
    Public Property BanBo() As Decimal
        Get
            Return _BanBo
        End Get
        Set(ByVal value As Decimal)
            _BanBo = value
        End Set
    End Property

    Private _DonViDT As String
    Public Property DonViDT() As String
        Get
            Return _DonViDT
        End Get
        Set(ByVal value As String)
            _DonViDT = value
        End Set
    End Property

    Private _TacGia As String
    Public Property TacGia() As String
        Get
            Return _TacGia
        End Get
        Set(ByVal value As String)
            _TacGia = value
        End Set
    End Property

#End Region
    ''' <summary>
    ''' Dùng để xem nhanh tồn kho
    ''' </summary>
    ''' <remarks></remarks>
    Private _MaNguon As String
    Public Property MaNguon() As String
        Get
            Return _MaNguon
        End Get
        Set(ByVal value As String)
            _MaNguon = value
        End Set
    End Property

    ''' <summary>
    ''' Cái này dùng cho Cân đối kế hoạch
    ''' </summary>
    ''' <remarks></remarks>
    Private _MaKeHoach As String
    Public Property MaKeHoach() As String
        Get
            Return _MaKeHoach
        End Get
        Set(ByVal value As String)
            _MaKeHoach = value
        End Set
    End Property

    ''' <summary>
    ''' Dùng cho NXT kí gửi
    ''' </summary>
    ''' <remarks></remarks>
    Private _IDDonViKG As String
    Public Property IDDonViKG() As String
        Get
            Return _IDDonViKG
        End Get
        Set(ByVal value As String)
            _IDDonViKG = value
        End Set
    End Property

    Private _IDSP As String
    Public Property IDSP() As String
        Get
            Return _IDSP
        End Get
        Set(ByVal value As String)
            _IDSP = value
        End Set
    End Property

    Private _IDKho As String
    Public Property IDKho() As String
        Get
            Return _IDKho
        End Get
        Set(ByVal value As String)
            _IDKho = value
        End Set
    End Property

    Private _MaKho As String
    Public Property MaKho() As String
        Get
            Return _MaKho
        End Get
        Set(ByVal value As String)
            _MaKho = value
        End Set
    End Property

    Private _TenKho As String
    Public Property TenKho() As String
        Get
            Return _TenKho
        End Get
        Set(ByVal value As String)
            _TenKho = value
        End Set
    End Property

    Private _SLDK_TMP As Decimal
    Public Property SLDK_TMP() As Decimal
        Get
            Return _SLDK_TMP
        End Get
        Set(ByVal value As Decimal)
            _SLDK_TMP = value
        End Set
    End Property

    Private _GBDK_TMP As Decimal
    Public Property GBDK_TMP() As Decimal
        Get
            Return _GBDK_TMP
        End Get
        Set(ByVal value As Decimal)
            _GBDK_TMP = value
        End Set
    End Property

    Private _GVDK_TMP As Decimal
    Public Property GVDK_TMP() As Decimal
        Get
            Return _GVDK_TMP
        End Get
        Set(ByVal value As Decimal)
            _GVDK_TMP = value
        End Set
    End Property

    Private _SLNK_TMP As Decimal
    Public Property SLNK_TMP() As Decimal
        Get
            Return _SLNK_TMP
        End Get
        Set(ByVal value As Decimal)
            _SLNK_TMP = value
        End Set
    End Property

    Private _GBNK_TMP As Decimal
    Public Property GBNK_TMP() As Decimal
        Get
            Return _GBNK_TMP
        End Get
        Set(ByVal value As Decimal)
            _GBNK_TMP = value
        End Set
    End Property

    Private _GVNK_TMP As Decimal
    Public Property GVNK_TMP() As Decimal
        Get
            Return _GVNK_TMP
        End Get
        Set(ByVal value As Decimal)
            _GVNK_TMP = value
        End Set
    End Property

    Private _SLXK_TMP As Decimal
    Public Property SLXK_TMP() As Decimal
        Get
            Return _SLXK_TMP
        End Get
        Set(ByVal value As Decimal)
            _SLXK_TMP = value
        End Set
    End Property

    Private _GBXK_TMP As Decimal
    Public Property GBXK_TMP() As Decimal
        Get
            Return _GBXK_TMP
        End Get
        Set(ByVal value As Decimal)
            _GBXK_TMP = value
        End Set
    End Property

    Private _GVXK_TMP As Decimal
    Public Property GVXK_TMP() As Decimal
        Get
            Return _GVXK_TMP
        End Get
        Set(ByVal value As Decimal)
            _GVXK_TMP = value
        End Set
    End Property

    Private _SLDK As Decimal
    Public Property SLDK() As Decimal
        Get
            Return _SLDK
        End Get
        Set(ByVal value As Decimal)
            _SLDK = value
        End Set
    End Property

    Private _GBDK As Decimal
    Public Property GBDK() As Decimal
        Get
            Return _GBDK
        End Get
        Set(ByVal value As Decimal)
            _GBDK = value
        End Set
    End Property

    Private _GVDK As Decimal
    Public Property GVDK() As Decimal
        Get
            Return _GVDK
        End Get
        Set(ByVal value As Decimal)
            _GVDK = value
        End Set
    End Property

    Private _SLNK As Decimal
    Public Property SLNK() As Decimal
        Get
            Return _SLNK
        End Get
        Set(ByVal value As Decimal)
            _SLNK = value
        End Set
    End Property

    Private _GBNK As Decimal
    Public Property GBNK() As Decimal
        Get
            Return _GBNK
        End Get
        Set(ByVal value As Decimal)
            _GBNK = value
        End Set
    End Property

    Private _GVNK As Decimal
    Public Property GVNK() As Decimal
        Get
            Return _GVNK
        End Get
        Set(ByVal value As Decimal)
            _GVNK = value
        End Set
    End Property

    Private _SLXK As Decimal
    Public Property SLXK() As Decimal
        Get
            Return _SLXK
        End Get
        Set(ByVal value As Decimal)
            _SLXK = value
        End Set
    End Property

    Private _GBXK As Decimal
    Public Property GBXK() As Decimal
        Get
            Return _GBXK
        End Get
        Set(ByVal value As Decimal)
            _GBXK = value
        End Set
    End Property

    Private _GVXK As Decimal
    Public Property GVXK() As Decimal
        Get
            Return _GVXK
        End Get
        Set(ByVal value As Decimal)
            _GVXK = value
        End Set
    End Property

    Private _SLCK As Decimal
    Public Property SLCK() As Decimal
        Get
            Return _SLCK
        End Get
        Set(ByVal value As Decimal)
            _SLCK = value
        End Set
    End Property

    Private _GBCK As Decimal
    Public Property GBCK() As Decimal
        Get
            Return _GBCK
        End Get
        Set(ByVal value As Decimal)
            _GBCK = value
        End Set
    End Property

    Private _GVCK As Decimal
    Public Property GVCK() As Decimal
        Get
            Return _GVCK
        End Get
        Set(ByVal value As Decimal)
            _GVCK = value
        End Set
    End Property

End Class